package ua.at.javac.entity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="journal")
public class Journal implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="journal_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	int id;
	
	@Column(name="uptodate")
	private java.sql.Date uptodate;
	
    @ManyToOne
    @JoinColumn(name="site_id")
    private Set<Site> site;

    @ManyToOne
	@JoinColumn(name="period_id")
    private Set<Period> period;

	@Column(name="cloudiness")
	private int cloudiness;

	@Column(name="temperature")
	private int temperature;
	
	@Column(name="precipitation")
	private float precipitation;
	
	@Column(name="humidity")
	private int humidity;
	
	@Column(name="pressure")
	private int pressure;
	
	@Column(name="windSpeed")
	private int windSpeed;
	
	@ManyToOne
	@Column(name="wind_id")
	private Set<Wind> wind;
	
	@Column(name="forecast_day")
	private int forecast_day;
}
